import request from "@/utils/request";

// 提现相关API
const withdrawApi = {
	// 账号绑定
	bindaccount(data : BindaccountParams) {
		return request.post<dataResult>({ url: "/api/customer/withdraw/bindaccount", data });
	},
	// 提现列表
	getlist(data : GetlistParams) {
		return request.post<dataResult>({ url: "/api/customer/withdraw/getlist", data });
	},
	// 申请提现
	apply(data : ApplyParams) {
		return request.post<dataResult>({ url: "/api/customer/withdraw/apply", data });
	}
};

export default withdrawApi;

interface dataResult {
	data ?: any;
	message : string;
	status : number;
}

//绑定账号请求参数
interface BindaccountParams {
	password : string;
	type : string;
	account : string;
	name : string;
	qrcode : string;
}

//体现列表请求参数
interface GetlistParams {
	page : number;
	limit : number;
	status : number | null;
}

//申请提现请求参数
interface ApplyParams {
	password : string;
	amount : number;
}